{subtemplate common/header}
<div id="pt" class="wp">
	<a href="index.php" class="nvhm">$_G['setting']['bbname']</a> &rsaquo;
	<a href="home.php">$_G[setting][navs][4][navname]</a> &rsaquo; 
	<a href="home.php?mod=medal">{lang medals}</a>
</div>

<div id="ct" class="wp cl">
	<div class="mn">
		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][4][filename]">$_G[setting][navs][4][navname]</a></label>
		</div>
		<div class="bm">
			<h1 class="mt"><img src="{STATICURL}image/feed/medal.gif" alt="{lang medals_list}" class="vm" /> {lang medals_list}</h1>
			<!--{if $medallogs}-->
			<ul class="tb cl">
				<li{if empty($_G[gp_action])} class="a"{/if}><a href="home.php?mod=medal">{lang medals_list}</a></li>
				<li{if $_G[gp_action] == 'log'} class="a"{/if}><a href="home.php?mod=medal&amp;action=log">{lang medals_log}</a></li>
			</ul>
			<!--{/if}-->
			<!--{if empty($_G[gp_action])}-->
				<form method="post" autocomplete="off" action="home.php?mod=medal&action=apply&medalsubmit=yes">
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<input type="hidden" name="medalid" value="" />
				<!--{if $medallogs}-->
					<h3 class="tbmu mbw cl"><span class="y xg1 xw0">{lang medals_oneself_num}</span>{lang medals_oneself}</h3>
					<ul class="ml mlm mdl mdlow cl">
						<!--{loop $medallogs $medallog}-->
						<li>
							<img src="{STATICURL}image/common/$medallog[image]" alt="$medallog[name]" />
							<p class="mtn"><strong>$medallog[name]</strong></p>
						</li>
						<!--{/loop}-->
					</ul>
				<!--{/if}-->

					<h3 class="tbmu mbw cl"><span class="y xg1 xw0">{lang total} {echo count($medallist);} {lang unit}</span><!--{if $medallogs}-->{lang medals_all}<!--{/if}--></h3>
				<!--{if $medallist}-->
					<ul class="ml mlm mdl cl">
						<!--{loop $medallist $key $medal}-->
						<li class="pns">
							<img src="{STATICURL}image/common/$medal[image]" alt="$medal[name]" />
							<p class="mtn"><strong>$medal[name]</strong></p>
							<p class="xg1">$medal[description]</p>
							<span>
								<!--{if $medal[expiration]}-->
									{lang expire} $medal[expiration] {lang days},
								<!--{/if}-->
								<!--{if $medal[permission]}-->
									$medal[permission]
								<!--{else}-->
									<!--{if $medal[type] == 0}-->
										{lang medals_type_0}
									<!--{elseif $medal[type] == 1}-->
										{lang medals_type_1}
									<!--{elseif $medal[type] == 2}-->
										{lang medals_type_2}
									<!--{/if}-->
								<!--{/if}-->
							</span>
							<!--{if $medal[type] && $_G['uid']}-->
								<button type="button" class="pn" onclick="this.form.medalid.value = '$medal[medalid]';this.form.submit();return false;">
									<em><!--{if !$medal[permission]}-->{lang medals_apply}<!--{else}-->{lang medals_draw}<!--{/if}--></em>
								</button>
							<!--{/if}-->
						</li>
						<!--{/loop}-->
					</ul>
				<!--{else}-->
					<!--{if $medallogs}-->
						<p class="emp">{lang medals_nonexistence}</p>
					<!--{else}-->
						<p class="emp">{lang medals_noavailable}</p>
					<!--{/if}-->
				<!--{/if}-->
				</form>
			<!--{elseif $_G[gp_action] == 'log'}-->
				<!--{if $medallogs}-->
				<ul class="ml mlm mdl cl mtw">
					<!--{loop $medallogs $medallog}-->
					<li>
						<img src="{STATICURL}image/common/$medallog[image]" alt="$medallog[name]" />
						<p class="mtn"><strong>$medallog[name]</strong></p>
						<!--{if $medallog['type'] == 2}-->
							<span>{lang medals_apply_dateline}: $medallog[dateline]</span>
							<p>{lang medals_operation_2}</p>
						<!--{else}-->
							<span>{lang medals_get_dateline}: $medallog[dateline]</span>
							<!--{if $medallog['type'] != 2 && $medallog['type'] != 3}-->
								<span><!--{if $medallog[expiration]}-->{lang expire}: $medallog[expiration]<!--{else}-->{lang medals_noexpire}<!--{/if}--></span>
							<!--{/if}-->
						<!--{/if}-->
					</li>
					<!--{/loop}-->
				</ul>
				<!--{/if}-->
				<!--{if $multipage}--><div class="pgs cl">$multipage</div><!--{/if}-->
			<!--{/if}-->
		</div>
	</div>
	<div class="sd">
		{subtemplate common/userabout}
	</div>
</div>


{template common/footer}